<template>
    <div class="client_details">
        <p>半年内订单</p>
        <div class="client_details_list">
            <ul v-for="(item, key) in detailList" :key="key">
                <li>
                    <span>订单金额</span>
                    <span>￥{{item.totalMoney}}</span>
                </li>
                <li>
                    <span>服务项目</span>
                    <span>{{item.question}}</span>
                </li>
                <li>
                    <span>提问用户</span>
                    <span>{{item.userName}}</span>
                </li>
                <li>
                    <span>解答大师</span>
                    <span>{{item.masterName}}</span>
                </li>
                <li>
                    <span>订单编号</span>
                    <span>{{item.orderNo}}</span>
                </li>
                <li>
                    <span>订单时间</span>
                    <span>{{item.time}}</span>
                </li>
                <li>
                    <span>总收入</span>
                    <span>{{item.totalMoney/10}}</span>
                </li>
            </ul>
        </div>
    </div>
</template>

<script>
    export default {
        name: 'clientDetails', 
        data() {
            return {
                detailList: []
            }
        },
        methods: {
            xia_detail() {
                let params = {
                    user_id: this.$route.query.uId,
                    shenfen: this.$route.query.uType
                }
                this.$http.fetchGet('xia_detail', params).then(res => {
                    if(res.code == 200) {
                        this.detailList = res.data
                    } else {
                        this.$vux.toast.text('没有订单')
                    }
                }, err => {

                })
            }
        },
        mounted() {
            this.xia_detail()
        }
    }
</script>

<style lang="less" scoped>
.client_details{ 
    width: 100%;
    height: 100%;
    background: #f2f2f2;
    display: flex;
    flex-direction: column;
    p{
        .lh(88);
        text-align: center;
    }
    .client_details_list{
        flex: 1;
        ul{
            .mb(20);
            li{
                .lh(88);
                .padd(0, 30);
                background: #fff;
                border-bottom: 1px solid #f2f2f2;
                display: flex;
                justify-content: space-between;
            }
        }
    }
}
</style>
